<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="de">
<head>
<meta http-equiv="Content-Type" content="text/html" charset="iso-8859-1">
<title>AbstractQueryRunner (Apache Commons DbUtils 1.6 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="AbstractQueryRunner (Apache Commons DbUtils 1.6 API)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/AbstractQueryRunner.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<li><a href="../../../../org/apache/commons/dbutils/AsyncQueryRunner.html" title="class in org.apache.commons.dbutils"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/commons/dbutils/AbstractQueryRunner.html" target="_top">Frames</a></li>
<li><a href="AbstractQueryRunner.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.commons.dbutils</div>
<h2 title="Class AbstractQueryRunner" class="title">Class AbstractQueryRunner</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.commons.dbutils.AbstractQueryRunner</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../../../org/apache/commons/dbutils/AsyncQueryRunner.html" title="class in org.apache.commons.dbutils">AsyncQueryRunner</a>, <a href="../../../../org/apache/commons/dbutils/QueryRunner.html" title="class in org.apache.commons.dbutils">QueryRunner</a></dd>
</dl>
<hr>
<br>
<pre>public abstract class <span class="strong">AbstractQueryRunner</span>
extends <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">The base class for QueryRunner & AsyncQueryRunner. This class is thread safe.</div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>1.4 (mostly extracted from QueryRunner)</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/6/docs/api/javax/sql/DataSource.html?is-external=true" title="class or interface in javax.sql">DataSource</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/dbutils/AbstractQueryRunner.html#ds">ds</a></strong></code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>Access to this field should be through <a href="../../../../org/apache/commons/dbutils/AbstractQueryRunner.html#getDataSource()"><code>getDataSource()</code></a>.</i></div>
</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/commons/dbutils/AbstractQueryRunner.html#AbstractQueryRunner()">AbstractQueryRunner</a></strong>()</code>
<div class="block">Default constructor, sets pmdKnownBroken to false and ds to null.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/commons/dbutils/AbstractQueryRunner.html#AbstractQueryRunner(boolean)">AbstractQueryRunner</a></strong>(boolean&nbsp;pmdKnownBroken)</code>
<div class="block">Constructor to control the use of <code>ParameterMetaData</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/commons/dbutils/AbstractQueryRunner.html#AbstractQueryRunner(javax.sql.DataSource)">AbstractQueryRunner</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/javax/sql/DataSource.html?is-external=true" title="class or interface in javax.sql">DataSource</a>&nbsp;ds)</code>
<div class="block">Constructor to provide a <code>DataSource</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/commons/dbutils/AbstractQueryRunner.html#AbstractQueryRunner(javax.sql.DataSource,%20boolean)">AbstractQueryRunner</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/javax/sql/DataSource.html?is-external=true" title="class or interface in javax.sql">DataSource</a>&nbsp;ds,
                   boolean&nbsp;pmdKnownBroken)</code>
<div class="block">Constructor to provide a <code>DataSource</code> and control the use of
 <code>ParameterMetaData</code>.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/dbutils/AbstractQueryRunner.html#close(java.sql.Connection)">close</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/sql/Connection.html?is-external=true" title="class or interface in java.sql">Connection</a>&nbsp;conn)</code>
<div class="block">Close a <code>Connection</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/dbutils/AbstractQueryRunner.html#close(java.sql.ResultSet)">close</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/sql/ResultSet.html?is-external=true" title="class or interface in java.sql">ResultSet</a>&nbsp;rs)</code>
<div class="block">Close a <code>ResultSet</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/dbutils/AbstractQueryRunner.html#close(java.sql.Statement)">close</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/sql/Statement.html?is-external=true" title="class or interface in java.sql">Statement</a>&nbsp;stmt)</code>
<div class="block">Close a <code>Statement</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/dbutils/AbstractQueryRunner.html#fillStatement(java.sql.PreparedStatement,%20java.lang.Object...)">fillStatement</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/sql/PreparedStatement.html?is-external=true" title="class or interface in java.sql">PreparedStatement</a>&nbsp;stmt,
             <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>...&nbsp;params)</code>
<div class="block">Fill the <code>PreparedStatement</code> replacement parameters with the
 given objects.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/dbutils/AbstractQueryRunner.html#fillStatementWithBean(java.sql.PreparedStatement,%20java.lang.Object,%20java.beans.PropertyDescriptor[])">fillStatementWithBean</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/sql/PreparedStatement.html?is-external=true" title="class or interface in java.sql">PreparedStatement</a>&nbsp;stmt,
                     <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;bean,
                     <a href="http://docs.oracle.com/javase/6/docs/api/java/beans/PropertyDescriptor.html?is-external=true" title="class or interface in java.beans">PropertyDescriptor</a>[]&nbsp;properties)</code>
<div class="block">Fill the <code>PreparedStatement</code> replacement parameters with the
 given object's bean property values.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/dbutils/AbstractQueryRunner.html#fillStatementWithBean(java.sql.PreparedStatement,%20java.lang.Object,%20java.lang.String...)">fillStatementWithBean</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/sql/PreparedStatement.html?is-external=true" title="class or interface in java.sql">PreparedStatement</a>&nbsp;stmt,
                     <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;bean,
                     <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;propertyNames)</code>
<div class="block">Fill the <code>PreparedStatement</code> replacement parameters with the
 given object's bean property values.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/javax/sql/DataSource.html?is-external=true" title="class or interface in javax.sql">DataSource</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/dbutils/AbstractQueryRunner.html#getDataSource()">getDataSource</a></strong>()</code>
<div class="block">Returns the <code>DataSource</code> this runner is using.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/dbutils/AbstractQueryRunner.html#isPmdKnownBroken()">isPmdKnownBroken</a></strong>()</code>
<div class="block">Some drivers don't support
 <a href="http://docs.oracle.com/javase/6/docs/api/java/sql/ParameterMetaData.html?is-external=true#getParameterType(int)" title="class or interface in java.sql"><code>ParameterMetaData.getParameterType(int)</code></a>; if
 <code>pmdKnownBroken</code> is set to true, we won't even try it; if
 false, we'll try it, and if it breaks, we'll remember not to use it
 again.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/6/docs/api/java/sql/Connection.html?is-external=true" title="class or interface in java.sql">Connection</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/dbutils/AbstractQueryRunner.html#prepareConnection()">prepareConnection</a></strong>()</code>
<div class="block">Factory method that creates and initializes a <code>Connection</code>
 object.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/6/docs/api/java/sql/PreparedStatement.html?is-external=true" title="class or interface in java.sql">PreparedStatement</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/dbutils/AbstractQueryRunner.html#prepareStatement(java.sql.Connection,%20java.lang.String)">prepareStatement</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/sql/Connection.html?is-external=true" title="class or interface in java.sql">Connection</a>&nbsp;conn,
                <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;sql)</code>
<div class="block">Factory method that creates and initializes a
 <code>PreparedStatement</code> object for the given SQL.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/6/docs/api/java/sql/PreparedStatement.html?is-external=true" title="class or interface in java.sql">PreparedStatement</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/dbutils/AbstractQueryRunner.html#prepareStatement(java.sql.Connection,%20java.lang.String,%20int)">prepareStatement</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/sql/Connection.html?is-external=true" title="class or interface in java.sql">Connection</a>&nbsp;conn,
                <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;sql,
                int&nbsp;returnedKeys)</code>
<div class="block">Factory method that creates and initializes a
 <code>PreparedStatement</code> object for the given SQL.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/dbutils/AbstractQueryRunner.html#rethrow(java.sql.SQLException,%20java.lang.String,%20java.lang.Object...)">rethrow</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a>&nbsp;cause,
       <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;sql,
       <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>...&nbsp;params)</code>
<div class="block">Throws a new exception with a more informative error message.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/6/docs/api/java/sql/ResultSet.html?is-external=true" title="class or interface in java.sql">ResultSet</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/dbutils/AbstractQueryRunner.html#wrap(java.sql.ResultSet)">wrap</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/sql/ResultSet.html?is-external=true" title="class or interface in java.sql">ResultSet</a>&nbsp;rs)</code>
<div class="block">Wrap the <code>ResultSet</code> in a decorator before processing it.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a name="ds">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ds</h4>
<pre><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
protected final&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/javax/sql/DataSource.html?is-external=true" title="class or interface in javax.sql">DataSource</a> ds</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>Access to this field should be through <a href="../../../../org/apache/commons/dbutils/AbstractQueryRunner.html#getDataSource()"><code>getDataSource()</code></a>.</i></div>
<div class="block">The DataSource to retrieve connections from.</div>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="AbstractQueryRunner()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>AbstractQueryRunner</h4>
<pre>public&nbsp;AbstractQueryRunner()</pre>
<div class="block">Default constructor, sets pmdKnownBroken to false and ds to null.</div>
</li>
</ul>
<a name="AbstractQueryRunner(boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>AbstractQueryRunner</h4>
<pre>public&nbsp;AbstractQueryRunner(boolean&nbsp;pmdKnownBroken)</pre>
<div class="block">Constructor to control the use of <code>ParameterMetaData</code>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>pmdKnownBroken</code> - Some drivers don't support
            <a href="http://docs.oracle.com/javase/6/docs/api/java/sql/ParameterMetaData.html?is-external=true#getParameterType(int)" title="class or interface in java.sql"><code>ParameterMetaData.getParameterType(int)</code></a>; if
            <code>pmdKnownBroken</code> is set to true, we won't even try
            it; if false, we'll try it, and if it breaks, we'll remember
            not to use it again.</dd></dl>
</li>
</ul>
<a name="AbstractQueryRunner(javax.sql.DataSource)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>AbstractQueryRunner</h4>
<pre>public&nbsp;AbstractQueryRunner(<a href="http://docs.oracle.com/javase/6/docs/api/javax/sql/DataSource.html?is-external=true" title="class or interface in javax.sql">DataSource</a>&nbsp;ds)</pre>
<div class="block">Constructor to provide a <code>DataSource</code>. Methods that do not
 take a <code>Connection</code> parameter will retrieve connections from
 this <code>DataSource</code>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ds</code> - The <code>DataSource</code> to retrieve connections from.</dd></dl>
</li>
</ul>
<a name="AbstractQueryRunner(javax.sql.DataSource, boolean)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>AbstractQueryRunner</h4>
<pre>public&nbsp;AbstractQueryRunner(<a href="http://docs.oracle.com/javase/6/docs/api/javax/sql/DataSource.html?is-external=true" title="class or interface in javax.sql">DataSource</a>&nbsp;ds,
                   boolean&nbsp;pmdKnownBroken)</pre>
<div class="block">Constructor to provide a <code>DataSource</code> and control the use of
 <code>ParameterMetaData</code>. Methods that do not take a
 <code>Connection</code> parameter will retrieve connections from this
 <code>DataSource</code>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ds</code> - The <code>DataSource</code> to retrieve connections from.</dd><dd><code>pmdKnownBroken</code> - Some drivers don't support
            <a href="http://docs.oracle.com/javase/6/docs/api/java/sql/ParameterMetaData.html?is-external=true#getParameterType(int)" title="class or interface in java.sql"><code>ParameterMetaData.getParameterType(int)</code></a>; if
            <code>pmdKnownBroken</code> is set to true, we won't even try
            it; if false, we'll try it, and if it breaks, we'll remember
            not to use it again.</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="getDataSource()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDataSource</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/javax/sql/DataSource.html?is-external=true" title="class or interface in javax.sql">DataSource</a>&nbsp;getDataSource()</pre>
<div class="block">Returns the <code>DataSource</code> this runner is using.
 <code>QueryRunner</code> methods always call this method to get the
 <code>DataSource</code> so subclasses can provide specialized behavior.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>DataSource the runner is using</dd></dl>
</li>
</ul>
<a name="isPmdKnownBroken()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isPmdKnownBroken</h4>
<pre>public&nbsp;boolean&nbsp;isPmdKnownBroken()</pre>
<div class="block">Some drivers don't support
 <a href="http://docs.oracle.com/javase/6/docs/api/java/sql/ParameterMetaData.html?is-external=true#getParameterType(int)" title="class or interface in java.sql"><code>ParameterMetaData.getParameterType(int)</code></a>; if
 <code>pmdKnownBroken</code> is set to true, we won't even try it; if
 false, we'll try it, and if it breaks, we'll remember not to use it
 again.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the flag to skip (or not)
         <a href="http://docs.oracle.com/javase/6/docs/api/java/sql/ParameterMetaData.html?is-external=true#getParameterType(int)" title="class or interface in java.sql"><code>ParameterMetaData.getParameterType(int)</code></a></dd><dt><span class="strong">Since:</span></dt>
  <dd>1.4</dd></dl>
</li>
</ul>
<a name="prepareStatement(java.sql.Connection, java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>prepareStatement</h4>
<pre>protected&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/sql/PreparedStatement.html?is-external=true" title="class or interface in java.sql">PreparedStatement</a>&nbsp;prepareStatement(<a href="http://docs.oracle.com/javase/6/docs/api/java/sql/Connection.html?is-external=true" title="class or interface in java.sql">Connection</a>&nbsp;conn,
                                 <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;sql)
                                      throws <a href="http://docs.oracle.com/javase/6/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Factory method that creates and initializes a
 <code>PreparedStatement</code> object for the given SQL.
 <code>QueryRunner</code> methods always call this method to prepare
 statements for them. Subclasses can override this method to provide
 special PreparedStatement configuration if needed. This implementation
 simply calls <code>conn.prepareStatement(sql)</code>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>conn</code> - The <code>Connection</code> used to create the
            <code>PreparedStatement</code></dd><dd><code>sql</code> - The SQL statement to prepare.</dd>
<dt><span class="strong">Returns:</span></dt><dd>An initialized <code>PreparedStatement</code>.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code> - if a database access error occurs</dd></dl>
</li>
</ul>
<a name="prepareStatement(java.sql.Connection, java.lang.String, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>prepareStatement</h4>
<pre>protected&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/sql/PreparedStatement.html?is-external=true" title="class or interface in java.sql">PreparedStatement</a>&nbsp;prepareStatement(<a href="http://docs.oracle.com/javase/6/docs/api/java/sql/Connection.html?is-external=true" title="class or interface in java.sql">Connection</a>&nbsp;conn,
                                 <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;sql,
                                 int&nbsp;returnedKeys)
                                      throws <a href="http://docs.oracle.com/javase/6/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Factory method that creates and initializes a
 <code>PreparedStatement</code> object for the given SQL.
 <code>QueryRunner</code> methods always call this method to prepare
 statements for them. Subclasses can override this method to provide
 special PreparedStatement configuration if needed. This implementation
 simply calls <code>conn.prepareStatement(sql, returnedKeys)</code>
 which will result in the ability to retrieve the automatically-generated
 keys from an auto_increment column.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>conn</code> - The <code>Connection</code> used to create the
            <code>PreparedStatement</code></dd><dd><code>sql</code> - The SQL statement to prepare.</dd><dd><code>returnedKeys</code> - Flag indicating whether to return generated keys or not.</dd>
<dt><span class="strong">Returns:</span></dt><dd>An initialized <code>PreparedStatement</code>.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code> - if a database access error occurs</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.6</dd></dl>
</li>
</ul>
<a name="prepareConnection()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>prepareConnection</h4>
<pre>protected&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/sql/Connection.html?is-external=true" title="class or interface in java.sql">Connection</a>&nbsp;prepareConnection()
                                throws <a href="http://docs.oracle.com/javase/6/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Factory method that creates and initializes a <code>Connection</code>
 object. <code>QueryRunner</code> methods always call this method to
 retrieve connections from its DataSource. Subclasses can override this
 method to provide special <code>Connection</code> configuration if
 needed. This implementation simply calls <code>ds.getConnection()</code>.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>An initialized <code>Connection</code>.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code> - if a database access error occurs</dd><dt><span class="strong">Since:</span></dt>
  <dd>DbUtils 1.1</dd></dl>
</li>
</ul>
<a name="fillStatement(java.sql.PreparedStatement, java.lang.Object...)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fillStatement</h4>
<pre>public&nbsp;void&nbsp;fillStatement(<a href="http://docs.oracle.com/javase/6/docs/api/java/sql/PreparedStatement.html?is-external=true" title="class or interface in java.sql">PreparedStatement</a>&nbsp;stmt,
                 <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>...&nbsp;params)
                   throws <a href="http://docs.oracle.com/javase/6/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Fill the <code>PreparedStatement</code> replacement parameters with the
 given objects.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>stmt</code> - PreparedStatement to fill</dd><dd><code>params</code> - Query replacement parameters; <code>null</code> is a valid
            value to pass in.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code> - if a database access error occurs</dd></dl>
</li>
</ul>
<a name="fillStatementWithBean(java.sql.PreparedStatement, java.lang.Object, java.beans.PropertyDescriptor[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fillStatementWithBean</h4>
<pre>public&nbsp;void&nbsp;fillStatementWithBean(<a href="http://docs.oracle.com/javase/6/docs/api/java/sql/PreparedStatement.html?is-external=true" title="class or interface in java.sql">PreparedStatement</a>&nbsp;stmt,
                         <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;bean,
                         <a href="http://docs.oracle.com/javase/6/docs/api/java/beans/PropertyDescriptor.html?is-external=true" title="class or interface in java.beans">PropertyDescriptor</a>[]&nbsp;properties)
                           throws <a href="http://docs.oracle.com/javase/6/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Fill the <code>PreparedStatement</code> replacement parameters with the
 given object's bean property values.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>stmt</code> - PreparedStatement to fill</dd><dd><code>bean</code> - a JavaBean object</dd><dd><code>properties</code> - an ordered array of properties; this gives the order to insert
            values in the statement</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code> - if a database access error occurs</dd></dl>
</li>
</ul>
<a name="fillStatementWithBean(java.sql.PreparedStatement, java.lang.Object, java.lang.String...)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fillStatementWithBean</h4>
<pre>public&nbsp;void&nbsp;fillStatementWithBean(<a href="http://docs.oracle.com/javase/6/docs/api/java/sql/PreparedStatement.html?is-external=true" title="class or interface in java.sql">PreparedStatement</a>&nbsp;stmt,
                         <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;bean,
                         <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;propertyNames)
                           throws <a href="http://docs.oracle.com/javase/6/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Fill the <code>PreparedStatement</code> replacement parameters with the
 given object's bean property values.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>stmt</code> - PreparedStatement to fill</dd><dd><code>bean</code> - A JavaBean object</dd><dd><code>propertyNames</code> - An ordered array of property names (these should match the
            getters/setters); this gives the order to insert values in the
            statement</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code> - If a database access error occurs</dd></dl>
</li>
</ul>
<a name="rethrow(java.sql.SQLException, java.lang.String, java.lang.Object...)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rethrow</h4>
<pre>protected&nbsp;void&nbsp;rethrow(<a href="http://docs.oracle.com/javase/6/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a>&nbsp;cause,
           <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;sql,
           <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>...&nbsp;params)
                throws <a href="http://docs.oracle.com/javase/6/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Throws a new exception with a more informative error message.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>cause</code> - The original exception that will be chained to the new
            exception when it's rethrown.</dd><dd><code>sql</code> - The query that was executing when the exception happened.</dd><dd><code>params</code> - The query replacement parameters; <code>null</code> is a valid
            value to pass in.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code> - if a database access error occurs</dd></dl>
</li>
</ul>
<a name="wrap(java.sql.ResultSet)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>wrap</h4>
<pre>protected&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/sql/ResultSet.html?is-external=true" title="class or interface in java.sql">ResultSet</a>&nbsp;wrap(<a href="http://docs.oracle.com/javase/6/docs/api/java/sql/ResultSet.html?is-external=true" title="class or interface in java.sql">ResultSet</a>&nbsp;rs)</pre>
<div class="block">Wrap the <code>ResultSet</code> in a decorator before processing it. This
 implementation returns the <code>ResultSet</code> it is given without any
 decoration.

 <p>
 Often, the implementation of this method can be done in an anonymous
 inner class like this:
 </p>

 <pre>
 QueryRunner run = new QueryRunner() {
     protected ResultSet wrap(ResultSet rs) {
         return StringTrimmedResultSet.wrap(rs);
     }
 };
 </pre></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>rs</code> - The <code>ResultSet</code> to decorate; never
            <code>null</code>.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The <code>ResultSet</code> wrapped in some decorator.</dd></dl>
</li>
</ul>
<a name="close(java.sql.Connection)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre>protected&nbsp;void&nbsp;close(<a href="http://docs.oracle.com/javase/6/docs/api/java/sql/Connection.html?is-external=true" title="class or interface in java.sql">Connection</a>&nbsp;conn)
              throws <a href="http://docs.oracle.com/javase/6/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Close a <code>Connection</code>. This implementation avoids closing if
 null and does <strong>not</strong> suppress any exceptions. Subclasses
 can override to provide special handling like logging.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>conn</code> - Connection to close</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code> - if a database access error occurs</dd><dt><span class="strong">Since:</span></dt>
  <dd>DbUtils 1.1</dd></dl>
</li>
</ul>
<a name="close(java.sql.Statement)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre>protected&nbsp;void&nbsp;close(<a href="http://docs.oracle.com/javase/6/docs/api/java/sql/Statement.html?is-external=true" title="class or interface in java.sql">Statement</a>&nbsp;stmt)
              throws <a href="http://docs.oracle.com/javase/6/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Close a <code>Statement</code>. This implementation avoids closing if
 null and does <strong>not</strong> suppress any exceptions. Subclasses
 can override to provide special handling like logging.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>stmt</code> - Statement to close</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code> - if a database access error occurs</dd><dt><span class="strong">Since:</span></dt>
  <dd>DbUtils 1.1</dd></dl>
</li>
</ul>
<a name="close(java.sql.ResultSet)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>close</h4>
<pre>protected&nbsp;void&nbsp;close(<a href="http://docs.oracle.com/javase/6/docs/api/java/sql/ResultSet.html?is-external=true" title="class or interface in java.sql">ResultSet</a>&nbsp;rs)
              throws <a href="http://docs.oracle.com/javase/6/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Close a <code>ResultSet</code>. This implementation avoids closing if
 null and does <strong>not</strong> suppress any exceptions. Subclasses
 can override to provide special handling like logging.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>rs</code> - ResultSet to close</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code> - if a database access error occurs</dd><dt><span class="strong">Since:</span></dt>
  <dd>DbUtils 1.1</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/AbstractQueryRunner.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<li><a href="../../../../org/apache/commons/dbutils/AsyncQueryRunner.html" title="class in org.apache.commons.dbutils"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/commons/dbutils/AbstractQueryRunner.html" target="_top">Frames</a></li>
<li><a href="AbstractQueryRunner.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2002&#x2013;2014 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>
